<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Vue中的条件渲染</title>
    <script src="./vue.js"></script>
</head>
<body>

<div id="app">
    <div v-if="show">
        用户名：<input key="username"/>
    </div>
    <div v-else>
        邮箱名：<input key="password"/>
    </div>
</div>

<script>
    var vm = new Vue({
        el: "#app",
        data: {
            show: true,
        }
    })
</script>
</body>
</html>






